package com.xcity.game.adventure.model;

import com.alibaba.fastjson.annotation.JSONField;

public class ActionTarget {

	@JSONField(name = "0")
	protected long id; // 玩家id
	@JSONField(name = "1")
	protected int gold; // (可偷取)现金
	
	public ActionTarget() {}
	
	public ActionTarget(long id) {
		this(id, 0);
	}
	
	public ActionTarget(long id, int gold) {
		this.id = id;
		this.gold = gold;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public int getGold() {
		return gold;
	}

	public void setGold(int gold) {
		this.gold = gold;
	}

	@Override
	public boolean equals(Object obj) {
		return obj instanceof ActionTarget && ((ActionTarget) obj).getId() == id;
	}
	
}
